import React,{Component} from "react"

import Search from "./search"
import ListItem from "./listItem"


 export default class App extends Component{
    state={
        searchText:"",//搜索的关键字
    }
    getSearchText=(searchText)=> this.setState({searchText})

    render(){
        return(
            <div className="box">
                <Search getSearchText={this.getSearchText}/>
                <ListItem searchText={this.state.searchText}/>
            </div>
        )
    }
}
